package com.shen.module_room.dao

import androidx.room.*
import com.shen.module_room.bean.ChatRecordBean
import com.shen.module_room.bean.UserInfoBean

/**
 * author:  shen
 * date:    2020/7/5
 */
@Dao
interface ChatRecordDao: BaseDao<ChatRecordBean> {

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun insert(element : ChatRecordBean)

    @Query("select * from chat_record")
    fun getAllChat():MutableList<ChatRecordBean>?

    @Query("delete from chat_record")
    fun deleteAll()

    @Query("delete from chat_record where id = :id")
    fun deleteById(id : Long)

}